<?php
include_once "define.php";
include_once "config.php";
include_once "utils.php";

$teamId = $_GET["tid"];
$arr = Util::readFromPSD($teamId);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title> DASHBOARD PES </title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<table border="1" cellspacing="1" cellpadding="5">
    <tr>
        <th colspan="3">
            <?php
                echo Team::getTeams()[$teamId]->getName();
            ?>
        </th>
    </tr>
    <tr>
        <th> Number </th>
        <th> Name </th>
        <th> Update </th>
    </tr>
<?php
    foreach ($arr as $info)
    {
?>
    <tr>
        <td> <?php echo $info[HGA_PLAYER_NUMBER];   ?> </td>
        <td> <?php echo $info[HGA_PLAYER_NAME];     ?> </td>
        <td> <?php echo $info[HGA_PLAYER_UPDATE];   ?> </td>
    </tr>
<?php
    }
?>
</table>
</body>
</html>
